//
//  TouZiXQ.m
//  投融保
//
//  Created by admin on 14-1-9.
//  Copyright (c) 2014年 木叶科技. All rights reserved.
//

#import "TouZiXQ.h"

@interface TouZiXQ (){
    NSDictionary *xqDic;
}

@end

@implementation TouZiXQ
extern NSMutableArray *arrtouzi;
extern NSString *key;
extern NSString *appKey;
@synthesize tradeId,detailId;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    
  
//    NSString *strAppInvestDetail=[NSString stringWithFormat:@"service=appInvestDetail&tradeId=374&detailId=905"];
    
    [self getXiangQinData];
}
-(void)getXiangQinData{
 NSString *strAppInvestDetail=[NSString stringWithFormat:@"service=appInvestDetail&tradeId=%@&detailId=%@",tradeId,detailId];
    NSLog(@"-------%@",strAppInvestDetail);
    mbHud = [[MBProgressHUD alloc]initWithView:self.view];
    mbHud.labelText = @"正在加载";
    [mbHud setMode:MBProgressHUDModeText];
    [mbHud show:YES];
    [self.view addSubview:mbHud];
    asyRequest = [MYWebService new];
    asyRequest.delegate = self;
    [asyRequest publicGetDataAsynWithKey:key encryptedString:strAppInvestDetail appKey:appKey];
    
}
-(void)finishSuccessRequest:(NSDictionary *)asyData{
    xqDic = [NSDictionary new];
    xqDic = asyData;
    NSLog(@"xqDic--------%@",xqDic);
    self.touZiMoney.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"amount"]];;
    self.touZiPerson.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"userName"]];
    self.shouYiMoney.text = [asyData valueForKey:@"divisionAmount"];
    self.proDate.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"timeLimit"]];
    //self.tzDateLable.text = [asyData valueForKey:@""];
    self.clLabe.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"effectiveDateTime"]];
    self.dqDateLable.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"expireDateTime"]];
    self.lsNum.text =[NSString stringWithFormat:@"%@",[asyData valueForKey:@"investFlowCode"]];
    self.shouYiLable.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"interestRate"]];
    self.tzDateLable.text = [NSString stringWithFormat:@"%@",[asyData valueForKey:@"tradeDate"]];
    self.xmName.text = [asyData valueForKey:@"tradeName"];
    sleep(1);
    [mbHud removeFromSuperview];

}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
    
}

- (IBAction)btnReturn:(UIButton *)sender {
    [self dismissViewControllerAnimated:NO completion:nil];
//    [self dismissModalViewControllerAnimated:NO];
}
#pragma mark-   -----------状态栏底色------
- (UIStatusBarStyle)preferredStatusBarStyle
{
    [self.view setBackgroundColor:[UIColor blackColor]];
    return UIStatusBarStyleLightContent;
}
- (BOOL)prefersStatusBarHidden
{
    return NO;
}
@end
